package com.kelvem.saas.workbanch.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum TemplatePositionEnum {
    query("query", "查询区"),
    column("column", "表格列"),
    opt("opt", "操作列"),
    batch("batch", "批量");

    private String code;
    private String name;
    
    public static String getNameByCode(String code){
        for(TemplatePositionEnum typeEnum : TemplatePositionEnum.values()){
            if(code.equals(typeEnum.code)){
                return typeEnum.name;
            }
        }
        return null;
    }
}
